const api = require('../utils/request.js')

module.exports = {
    // 修改个人信息
    updateUserInfo:function(data){
      return api.request(
          '/wechat/updateUserInfo',
          'post',
          data
      )
    },
    // 添加景点
    addScenic:function(data){
      return api.request(
          '/wechat/spots/add',
          'post',
          data
      )
    },
    // 获取营地下的景区列表
    getScenicList:function(campId){
      return api.request(
        `/wechat/spots/getInfoByCampId/${campId}`,
        "get"
      )
    },
    // 获取景点详情
    getScenicDetail:function(scenicId){
      return api.request(
        `/wechat/spots/getInfoByScenicId/${scenicId}`,
        "get"
      )
    },
    // 删除景点
    deleteScenic:function(scenicId){
      return api.request(
        `/wechat/spots/delete/${scenicId}`,
        "delete"
      )
    }
}
